{% extends "base.html" %}

{% block content %}
<div class="card">
    <div class="card-header">
        预约查询结果
    </div>
    <div class="card-body">
        {% if booking %}
        <dl class="row">
            <dt class="col-sm-3">预约状态</dt>
            <dd class="col-sm-9">
                <span class="badge bg-{{ 'success' if booking.status == 'approved' else 'danger' if booking.status == 'rejected' else 'warning' }}">
                    {{ booking.status }}
                </span>
            </dd>
            
            <dt class="col-sm-3">会议室</dt>
            <dd class="col-sm-9">{{ booking.room.name }}</dd>
            
            <dt class="col-sm-3">预约时间</dt>
            <dd class="col-sm-9">{{ booking.date }} {{ booking.time_slot }}</dd>
            
            {% if booking.reason %}
            <dt class="col-sm-3">审批意见</dt>
            <dd class="col-sm-9">{{ booking.reason }}</dd>
            {% endif %}
        </dl>
        {% else %}
        <div class="alert alert-warning">未找到预约记录</div>
        {% endif %}
        <a href="/" class="btn btn-primary">返回首页</a>
    </div>
</div>
{% endblock %}